package com.cn.serverline.lineicp.productionLine.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import lombok.Getter;

/**
 * @author Gmr
 * @since 2024/7/28
 */
@Getter
public enum WorkSectionException implements AbstractExceptionEnum {

	WORK_SECTION_ID_NOT_NULL(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "01", "工段ID不能为空"),
	WORK_SECTION_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "02","工段不存在"),
	WORK_SECTION_TYPE_NOT_EXIST(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "03", "请先在字典配置对应工段类型"),
	WORK_SECTION_DUPLICATE_NAME(RuleConstants.BUSINESS_ERROR_TYPE_CODE + "04", "名称重复");

	/**
	 * 异常编码
	 */
	private final String errorCode;

	/**
	 * 异常提示
	 */
	private final String userTip;

	WorkSectionException(String errorCode, String userTip) {
		this.errorCode = errorCode;
		this.userTip = userTip;
	}

}
